import React from 'react';

const routes = [
    {
        path: '/',
        component: React.lazy(() => import('@/pages/home')),
        name:'home',
        meta: {
            title:'首页'
        }
    },
    {
        path: '/details/:id',
        component: React.lazy(() => import('@/pages/details')),
        name:'details',
        meta: {
            title:'详情'
        }
    },
    {
        path: '/personal',
        component: React.lazy(() => import('@/pages/personal')),
        name:'personal',
        meta:{
            title:'个人中心'
        }
    },
    {
        path: '/store',
        component: React.lazy(() => import('@/pages/store')),
        name:'store',
        meta:{
            title:'收藏'
        }
    },
    {
        path: '/login',
        component: React.lazy(() => import('@/pages/login')),
        name:'login',
        meta:{
            title:'登录'
        }
    },
    {
        path: '/updateInfo',
        component: React.lazy(() => import('@/pages/updateInfo')),
        name:'updateInfo',
        meta:{
            title:'更新信息'
        }
    },
    {
        path: '*',
        component: React.lazy(() => import('@/pages/notFound')),
        name:'404',
        title:'未找到'
    }
]

export default routes;